package org.apix.configuration;

import java.io.File;

import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.util.config.Configuration;


public class PluginStorageData {
	protected Configuration conf;
	
	public PluginStorageData() {
		
		if(!new File("plugins/Apix").exists()){
           	new File("plugins/Apix").mkdir();
        }		
		File f = new File("plugins/Apix/", "config.yml");
		conf = new Configuration(f);
		if (f.exists())
        {        	
        	conf.load();
        }
        else {
            conf.save();
        }
	}
	
	public static PluginStorageData getInstance() {
		  return new PluginStorageData();
	}
	
	public int getCooldown(String cooldown) {
		return conf.getInt("cooldown."+cooldown, 0);
	}
}
